package com.caiHao.homework;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class HomeworkTest {

    public static void main(String[] args) {
        // 导入配置文件
        ApplicationContext context = new ClassPathXmlApplicationContext("homework.xml");

        // 获取bean
        Homework homework = context.getBean("caiHaoHomework", Homework.class);

        homework.say();
    }
}
